﻿using System;

namespace ComToolkit
{
    public class AdoComException : AdoException
    {
        public AdoComException(dynamic error, Exception innerExeption, string message = "", params object[] args)
            : base(innerExeption, message, args)
        {
            if (error != null)
            {
                Id = error[0].Number;
                Description = error[0].Description;
                Source = error[0].Source;
            }
        }
        public int Id { get; private set; }
        public string Description { get; private set; }
        public string Source { get; private set; }
    }
}
